using System;
using System.Collections.Generic;
using System.Text;
using System.IO;
using System.Xml.Serialization;

namespace PresentationManager
{
    /// <summary>
    /// Database for presentations
    /// </summary>
    public class DemoDatabase
    {
        public List<DemoInfo> DemoInformations = new List<DemoInfo>();

        /// <summary>
        /// Serializes the specified output.
        /// </summary>
        /// <param name="output">The output.</param>
        public void Serialize(TextWriter output)
        {
            XmlSerializer serializer = new XmlSerializer(this.GetType());
            serializer.Serialize(output, this);
        }

        /// <summary>
        /// Deserializes the specified input.
        /// </summary>
        /// <param name="input">The input.</param>
        /// <returns></returns>
        public static DemoDatabase Deserialize(TextReader input)
        {
            XmlSerializer serializer = new XmlSerializer(typeof(DemoDatabase));
            return serializer.Deserialize(input) as DemoDatabase;
        }
    }

    /// <summary>
    /// Information for presentations
    /// </summary>
    public class DemoInfo
    {
        public string Name;
        public string Description;
        public string Path;
    }
}
